Skip to content

Wire Broker listeners to healthchecks#7141

Merged
sorindumitru merged 2 commits into
spiffe:mainfrom
matheuscscp:broker-health
Jul 16, 2026
Merged

Wire Broker listeners to healthchecks#7141
sorindumitru merged 2 commits into
spiffe:mainfrom
matheuscscp:broker-health

Conversation

@matheuscscp

@matheuscscp matheuscscp commented Jul 11, 2026

Copy link
Copy Markdown
Contributor

Part of: #7116

When enabled, Broker API will now be part of the health checks.

Signed-off-by: Matheus Pimenta <matheuscscp@gmail.com>
@matheuscscp
matheuscscp marked this pull request as ready for review July 16, 2026 00:05
@matheuscscp
matheuscscp requested a review from evan2645 as a code owner July 16, 2026 00:05
Copilot AI review requested due to automatic review settings July 16, 2026 00:05

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates the SPIRE Agent startup/healthcheck wiring so that the Broker API (when configured) is treated as part of “API readiness” before the agent is considered started and before health checks begin serving.

Changes:

  • Add a “listening” hook to broker endpoints and expose a WaitForListening method.
  • Update agent startup coordination to wait for all enabled APIs (Workload/SDS and Broker) to begin listening before setting a.started and unblocking health checks.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
pkg/agent/broker/endpoints.go Adds a listening hook and WaitForListening signal so broker listeners can participate in agent readiness gating.
pkg/agent/agent.go Aggregates readiness signals from enabled API servers (agent endpoints + broker endpoints) before marking the agent started and enabling health checks.

Comment thread pkg/agent/broker/endpoints.go Outdated
Signed-off-by: Matheus Pimenta <matheuscscp@gmail.com>

@sorindumitru sorindumitru left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks @matheuscscp!

@sorindumitru sorindumitru added this to the 1.15.3 milestone Jul 16, 2026
@sorindumitru
sorindumitru added this pull request to the merge queue Jul 16, 2026
Merged via the queue into spiffe:main with commit 6c257c3 Jul 16, 2026
55 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants